ODNameSpace
- Superclasses
ODObject
- Subclasses
ODObjectNameSpace
,ODValueNameSpace
An object of the
ODNameSpace
class associates an object or data structure with a unique key and provides a fast way to retrieve information.Description
A name space object allows a part to identify an object or value using a unique key, which can be passed easily between parts. Parts can use name spaces to store references to parts that support, for example, scripting systems. A part can then iterate over the content of the name space to obtain a list of scriptable parts or to send a message to each of the scriptable parts. Name spaces can also be written to a storage unit and read back in later.The
ODNameSpace
class is an abstract class that defines the basic name-space functionality. OpenDoc defines the subclasses corresponding to two types of name space: object and value. An object of theODObjectNameSpace
class (page 450) represents an object name space, which stores objects; an object of theODValueNameSpace
class (page 820) represents a value name space, which stores values of any types as byte arrays.Your part creates a new name space by calling the name-space manager's
CreateNameSpace
method (page 436), specifying a unique name that OpenDoc can use to identify the new name space. Entries within the name space must similarly be identified by a unique key. To obtain a reference to an existing name space, your part calls the name-space manager'sHasNameSpace
method (page 438).Name spaces can be arranged hierarchically to allow you to search multiple name spaces for a single key. Searches move from a child name space to its parent name space until the entry is found or until there are no more name spaces to search. A search also stops if the type of the parent name space is different from the type of the child name space, for example, if a value name space is the child of an object name space.
Methods
This section presents summary descriptions of theODNameSpace
methods grouped according to purpose, followed by detailed descriptions in alphabetical order.Name-Space Entries
Name-Space Attributes
Unregister
- Removes the specified entry from this name space.
Exists
- Returns a Boolean value that indicates whether this name space contains an entry with the specified key.
Name-Space Storage
GetName
- Returns the unique name of this name space.
GetParent
- Returns a reference to the parent name space of this name space.
GetType
- Returns the type of this name space.
SetType
- Sets the type of this name space.
ReadFromStorage
- Reads the content of this name space from the specified storage-unit view.
WriteToStorage
- Writes the content of this name space to the specified storage-unit view.
Methods
Exists
GetName
GetParent
GetType
ReadFromStorage
SetType
Unregister
WriteToStorage
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help